Expo Router
The File-based router for universal React Native apps
内部でReact Navigationを使っている
docs
github
Next.jsと同じようにfile-system based routingができる
アプリこれでできるのかなり良さそうmrsekut.icon
bottom-tabとかも対応してるの?
Dynamic routes
code:ts
<Link
href={{
pathname: "/(app)/note/note",
params: {
note: item.id,
},
}}
</Link>
code:ts
const router = useRouter();
router.push({
pathname: "/(app)/note/note",
params: {
note: item.id,
},
});
Layout Root
https://docs.expo.dev/routing/layouts/#create-a-layout-route
nextのlayoutと同じ
Groups
nextのgroupと同じ
https://docs.expo.dev/routing/layouts/#groups
Modal
https://docs.expo.dev/router/advanced/modals/
Typed routes
https://docs.expo.dev/router/reference/typed-routes/
Expo Router v2
DeepLink
bacontext://note/{noteId}
Async routes
https://docs.expo.dev/router/reference/async-routes/
Static Rendering
https://docs.expo.dev/router/reference/static-rendering/
web関連
https://expo.github.io/router/docs/
https://blog.expo.dev/rfc-file-system-based-routing-in-react-native-7a35474722a
https://speakerdeck.com/doggy/expo-router-ha-expo-dao-ru-nojue-meshou-tonaruka-hurontoendokanhuarensuchong-nawa-2023-at-kaito-dogi
https://tech.hello.ai/entry/2023/07/10/124124
Expo Router v2
https://blog.expo.dev/announcing-expo-router-v1-1d97d7833605
v1.0
https://blog.expo.dev/expo-router-v3-beta-is-now-available-eab52baf1e3e
v3 beta